import request from '@/utils/request';

/**
 * 查询
 * @param currentPage 当前页
 */
export async function query({currentPage}){
  return request('/api/getAdminPageList',{
    params: {page:currentPage}
  });
}
/**
 * 新建
 * @param user 用户对象
 */
export async function save({user}){
  return request('/api/saveAdmin',{
    method: 'POST',
    data: user
  })
}
/**
 * 删除
 * @param id  标识
 */
export async function del({id}){
  return request('/api/deleteAdmin',{
    params: {id:id}
  })
}
/**
 * 获取角色列表
 */
export async function getRoleList(){
  return request('/api/getRoleList');
}
